<ol class="breadcrumb">
	<li><a href="<?php echo $this->url(array('module' => 'admin', 'controller' => 'index'), null, true); ?>">Home</a></li>
	<li><a href="<?php echo $this->url(array('module' => 'admin', 'controller' => 'candidato'), null, true); ?>">Candidatos</a></li>
	<li class="active">Alterar</li>
</ol>

<form method="post" class="form-horizontal" role="form" enctype="multipart/form-data">
	<?php echo $this->form->id; ?>
	<div class="form-group <?php echo isset($this->error['foto']) ? 'has-error' : ''; ?>">
		<label for="foto" class="col-sm-2 control-label">Foto</label>
		<div class="col-sm-4">
			<?php if (!is_null($this->candidato['foto'])): ?>
			<div style="margin-bottom: 15px;">
				<img alt="<?php echo $this->candidato['nome']; ?>" src="<?php echo $this->baseUrl() . '/fotos/' . $this->candidato['foto']; ?>" class="img-thumbnail img-responsive" />
			</div>
			<?php endif; ?>
			<?php echo $this->form->foto; ?>
		</div>
		<?php if (isset($this->error['foto'])): ?><label class="control-label"><?php echo current($this->error['foto']); ?></label><?php endif; ?>
	</div>
	<div class="form-group <?php echo isset($this->error['sequencial']) ? 'has-error' : ''; ?>">
		<label for="sequencial" class="col-sm-2 control-label">Sequencial</label>
		<div class="col-sm-4">
			<?php echo $this->form->sequencial; ?>
		</div>
		<?php if (isset($this->error['sequencial'])): ?><label class="control-label"><?php echo current($this->error['sequencial']); ?></label><?php endif; ?>
	</div>
	<div class="form-group <?php echo isset($this->error['politico_id']) ? 'has-error' : ''; ?>">
		<label for="politico" class="col-sm-2 control-label">Político</label>
		<div class="col-sm-4">
			<?php echo $this->form->politico_id; ?>
			<?php echo $this->form->politico_nome; ?>
		</div>
		<?php if (isset($this->error['politico_id'])): ?><label class="control-label"><?php echo current($this->error['politico_id']); ?></label><?php endif; ?>
	</div>
	<div class="form-group <?php echo isset($this->error['numero']) ? 'has-error' : ''; ?>">
		<label for="numero" class="col-sm-2 control-label">Número</label>
		<div class="col-sm-4">
			<?php echo $this->form->numero; ?>
		</div>
		<?php if (isset($this->error['numero'])): ?><label class="control-label"><?php echo current($this->error['numero']); ?></label><?php endif; ?>
	</div>
	<div class="form-group <?php echo isset($this->error['nome']) ? 'has-error' : ''; ?>">
		<label for="nome" class="col-sm-2 control-label">Nome Urna</label>
		<div class="col-sm-4">
			<?php echo $this->form->nome; ?>
		</div>
		<?php if (isset($this->error['nome'])): ?><label class="control-label"><?php echo current($this->error['nome']); ?></label><?php endif; ?>
	</div>
	<div class="form-group <?php echo isset($this->error['eleicao_id']) ? 'has-error' : ''; ?>">
		<label for="eleicao" class="col-sm-2 control-label">Eleição</label>
		<div class="col-sm-4">
			<?php echo $this->form->eleicao_id; ?>
		</div>
		<?php if (isset($this->error['eleicao_id'])): ?><label class="control-label"><?php echo current($this->error['eleicao_id']); ?></label><?php endif; ?>
	</div>
	<div class="form-group <?php echo isset($this->error['cargo_id']) ? 'has-error' : ''; ?>">
		<label for="cargo" class="col-sm-2 control-label">Cargo</label>
		<div class="col-sm-4">
			<?php echo $this->form->cargo_id; ?>
		</div>
		<?php if (isset($this->error['cargo_id'])): ?><label class="control-label"><?php echo current($this->error['cargo_id']); ?></label><?php endif; ?>
	</div>
	<div class="form-group <?php echo isset($this->error['partido_id']) ? 'has-error' : ''; ?>">
		<label for="partido" class="col-sm-2 control-label">Partido</label>
		<div class="col-sm-4">
			<?php echo $this->form->partido_id; ?>
		</div>
		<?php if (isset($this->error['partido_id'])): ?><label class="control-label"><?php echo current($this->error['partido_id']); ?></label><?php endif; ?>
	</div>
	<div class="form-group <?php echo isset($this->error['coligacao_id']) ? 'has-error' : ''; ?>">
		<label for="coligacao" class="col-sm-2 control-label">Coligação</label>
		<div class="col-sm-4">
			<?php echo $this->form->coligacao_id; ?>
		</div>
		<?php if (isset($this->error['coligacao_id'])): ?><label class="control-label"><?php echo current($this->error['coligacao_id']); ?></label><?php endif; ?>
	</div>
	<div class="form-group <?php echo isset($this->error['estado_id']) ? 'has-error' : ''; ?>">
		<label for="estado" class="col-sm-2 control-label">Estado</label>
		<div class="col-sm-4">
			<?php echo $this->form->estado_id; ?>
		</div>
		<?php if (isset($this->error['estado_id'])): ?><label class="control-label"><?php echo current($this->error['estado_id']); ?></label><?php endif; ?>
	</div>
	<div class="form-group <?php echo isset($this->error['cidade_id']) ? 'has-error' : ''; ?>">
		<label for="cidade" class="col-sm-2 control-label">Cidade</label>
		<div class="col-sm-4">
			<?php echo $this->form->cidade_id; ?>
		</div>
		<?php if (isset($this->error['cidade_id'])): ?><label class="control-label"><?php echo current($this->error['cidade_id']); ?></label><?php endif; ?>
	</div>
	<div class="form-group <?php echo isset($this->error['situacao_id']) ? 'has-error' : ''; ?>">
		<label for="situacao" class="col-sm-2 control-label">Situação</label>
		<div class="col-sm-4">
			<?php echo $this->form->situacao_id; ?>
		</div>
		<?php if (isset($this->error['situacao_id'])): ?><label class="control-label"><?php echo current($this->error['situacao_id']); ?></label><?php endif; ?>
	</div>
	<div class="form-group <?php echo isset($this->error['resultado_id']) ? 'has-error' : ''; ?>">
		<label for="resultado" class="col-sm-2 control-label">Resultado</label>
		<div class="col-sm-4">
			<?php echo $this->form->resultado_id; ?>
		</div>
		<?php if (isset($this->error['resultado_id'])): ?><label class="control-label"><?php echo current($this->error['resultado_id']); ?></label><?php endif; ?>
	</div>
	<div class="form-group">
		<div class="col-sm-offset-2 col-sm-4">
			<button type="submit" class="btn btn-success">salvar</button>
		</div>
	</div>
</form>